package com.ljc.cjgl.repository;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ljc.cjgl.entitiy.ActivityAttachment;

@Repository
public interface ActivityAttachmentRepository extends JpaRepository<ActivityAttachment, Integer>, JpaSpecificationExecutor<ActivityAttachment> {

	public List<ActivityAttachment> findByUid(String uid);
	@Query(value="from ActivityAttachment t where t.activity.id=?1 and t.type=?2")
	public List<ActivityAttachment> findByActivityIdAndType(Integer id, int i);

}
